public class BranchManager implements Manager {

    private static final int ALLOWED_INCREASE = 500;

    private Manager boss;

    public BranchManager(Manager boss) {
        this.boss = boss;
    }

    @Override
    public void increaseSalary(int increase) {
        if (increase <= ALLOWED_INCREASE) {
            System.out.println("Salary was increased by Branch Manager.\n");
        } else {
            boss.increaseSalary(increase);
        }
    }

    public Manager getBoss() {
        return boss;
    }

    public void setBoss(Manager boss) {
        this.boss = boss;
    }
}
